what is regular expression not generated over {a,b}?

Posted by Loop on Stack Overflow See other posts from Stack Overflow or by Loop
Published on 2010-04-20T22:20:05Z Indexed on 2010/04/20 22:23 UTC
Read the original article Hit count: 147

Filed under:
|
|
|

Hello all,

I am really stuck with these 2 question for over 2 days now. trying to figure out what the question means.... my tutor is out of town too....

write a regular expression for the only strings that are not generated over {a,b} by the expression: (a+b)*a(a+b)*. explain your reasoning.

and i tried the second question, do you think is there any better answer than this one?

what is regular expression of set of string that contain an odd number of a's or exactly two b's................(a((a|b)(a|b))*|bb).... coz i know to represent any odd length of a's, the RE is a((a|b)(a|b))*

© Stack Overflow or respective owner

Related posts about regex

Related posts about regex-negation